﻿#region Header

/*
Behavioral Rating of Dancing Human Crowds based on Motion Patterns
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

#endregion

namespace paravili.Services {
	/// <summary>
	/// solves the matching problem based on a n x n matrix of distances
	/// </summary>
	public interface IDoMatchingService {
		#region Public Methods

		/// <summary>
		/// resolve the matching problem, given by a n x n matrix of distances
		/// </summary>
		/// <param name="data">n x n matrix of distances</param>
		/// <returns></returns>
		Match[] FindMatch(int[,] data);

		#endregion
	}

	/// <summary>
	/// Description of the class
	/// </summary>
	public interface IDoMatchingService2 {
		#region Public Methods

		Match[] FindMatch(MatchingServiceInputData data);

		#endregion
	}

	public class MatchingServiceInputData {
		public int StartIndex { get; set; }
		public int TargetIndex { get; set; }
		public Arc[] Arcs { get; set; }

		#region Nested type: Arc

		public struct Arc {
			public int FromIndex { get; set; }
			public int ToIndex { get; set; }
			public int Cost { get; set; }
			public int Capacity { get; set; }
		}

		#endregion
	}

	public class Match {
		public int FromIndex { get; internal set; }
		public int ToIndex { get; internal set; }
		public double Distance { get; internal set; }
	}
}